﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Company.Merchandising.BusinessLayer.DataEntities;

namespace Company.Merchandising.DataAccessLayer.DataAccessCommon
{
	public class DACAddress : DACBase
	{
		public DACAddress(MerchModelEntities modelEntities) : base(modelEntities) { }

		public IQueryable<Address> GetAllAddresses()
		{
			return from address in _modelEntities.Address select address;
		}

		public Address GetAddressById(int addressId)
		{
			return (from address in _modelEntities.Address where address.Id == addressId select address).FirstOrDefault();
		}
	}
}
